#ifndef __DEBUGUARTCOMMANDSERVER_H__
#define __DEBUGUARTCOMMANDSERVER_H__

#include "commandlinestream.h"
#include "soc/interface/if_soc_uart.h"

/// @brief 命令服务器
class DebugUartCommandServer : public CommandLineStream
{
public:
    explicit DebugUartCommandServer();
    virtual ~DebugUartCommandServer();

public:
    void Attach(IF_SOC_Uart *uart);
    void Dettach();

protected:
    bool OnWriteStream(const char *str);

private:
    IF_SOC_Uart *m_uart = nullptr;
};

#endif // __DEBUGUARTCOMMANDSERVER_H__
